var msg 
$.ajax({
        url: "http://47.94.4.201/index.php/index/index/getcode",
        type: "get",
        success: function (data) {
            msg = data.msg
            alert(msg);
        },
        error: function (data) {
            console.log(data);
        }
})
function dl(){
    $.ajax({
            url: "http://47.94.4.201/index.php/index/index/login",
            type: "post",
            data: {
                name:$('input').eq(0).val(),
                pwd:$('input').eq(1).val(),
                vercode:$('input').eq(2).val()
            },
            success: function (data) {
                sessionStorage.setItem('data',JSON.stringify(data))
                if(data.msg == "登录信息"){
                    location.assign('./首页.html')
                    var data2 = [{
                        id:1,
                        name:'李老师',
                        img:'https://c-ssl.duitang.com/uploads/item/202008/18/20200818183824_HcHJZ.jpeg',
                        user:'pppp',
                        sex:'男',
                        csrq:'1996',
                        jg:'未知',
                        sjhm:10086100861,
                        dzyx:'2721085986@qq.com',
                        rzrq:'2021',
                        grjs:'好'
                    }]
                    localStorage.setItem('data3',JSON.stringify(data2))
                }else {
                    alert(data.msg);
                }
            },
            error: function (data) {
                console.log(data);
        }})
}